#include <stdio.h>
typedef struct _INFO
{
    int data;
    char name[20];
} INFO;

INFO *SearchIn(INFO *p, int n, int x);

int main()
{
    int i, n, x;
    INFO info[10], *p;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d %s", &info[i].data, info[i].name);

    scanf("%d", &x);
    p = SearchIn(info, n, x);

    if (p != NULL)
        printf("%s %d\n", p->name, p->data);
    else
        printf("Not Found!\n");

    return 0;
}
INFO *SearchIn(INFO *p, int n, int x)
{
    int i;
    for (i = 0; i < n; i++)
    {
        if ((p + i)->data == x)
            return (p + i);
    }
    return NULL;
};
